import { roomStatus } from '../../../constants/status'

Page({
  data: {
    roomStatus,
    detail: {},
  },
  // 修改房屋信息
  editHouse() {
    wx.navigateTo({
      url: `/house_pkg/pages/form/index?id=${this.data.detail.id}`,
    })
  },
  async onLoad(query) {
    const res = await wx.http.get(`/room/${query.id}`)
    // console.log(res)
    this.setData({
      detail: res.data,
    })
  },
})
